<?php  
	$pPageIsPublic = true;
	include('_common.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>www.mifoodcourt.com</title>
	<link rel="stylesheet" href="_css/main.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="_css/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="_css/bg.css" type="text/css" media="screen" />
	
</head>
<body>
	<img id="bgimg" src="_images/bg.jpg" />
	<div id="realBody">
	 <div id="wrapper">
		<div id="content">
			<header>
				<h1><a href="/">mifoodcourt.com</a></h1>
			</header>
<div class="wrap" style="margin: 10px 0" >
			<section id="products" style="margin: 0;" >
<?php
	$cats = new Categoria();
	if ($cats ->loadItems("#categoriaId ASC")) {
		print "<ul>";	
		while ($cat  = $cats ->rNext()) {
			print "<li><strong>{$cat ->titulo}</strong>" . ($cat ->descripcion ? "<br/><i>{$cat ->descripcion}</i>" : "");
			if ($menus = $cat ->gMenu()) {
				print "<ul>";
				while ($menu = $menus ->rNext()) {
					print "<li><label><input type=\"checkbox\" name=\"menu[]\" value=\"{$menu ->id}\" id=\"m{$menu ->id}\"  />{$menu ->titulo} <span class=\"precio\">S/. {$menu ->precio}</span></label></li>";
				}	
				print "</ul>";
			}
			print "</li>";
		}
		print "</ul>";
	} 
?>				
			</section>
			<!-- aside>
				<div id="followbox"></div>
				<div id="cart">
					<h2>Su cesta de pedido</h2>
					<p>Realice su pedido, arrastrando su plato de selecci&oacute;n a la seccion de abajo.</p>
					<div class="dropzone"><p>Arrastre su plato aqu&iacute;.</p></div>
					<div class="cart-content">
						<ol>
							<li class="placeholder">Usted no tiene items en su cesta.</li>
						</ol>
					</div>
					<div class="empty">Limpiar la cesta.</div>
					<div class="empty2">Finalizar</div>

				</div>
			</aside-->
			<!-- a href="#loremipsum?lightbox[width]=610&lightbox[height]=360&lightbox[modal]=true" class="lightbox">Open Localhost Iframe</a-->
			<a href="?lightbox[width]=340&lightbox[height]=260&lightbox[modal]=true#loremipsum" class="lightbox" id="checkout" >Open LoremIpsum</a>
			<!-- div id="dialog-confirm" title="Empty Cart">Are you sure you want to empty the contents of your shopping cart.</div-->
</div><div style="clear: both;" >asdasd</div>
			<footer>
				<p>&copy;2013 mifoodcourt.com - Todos los derechos reservados.</p>
			</footer>
            
            <style>
#loremipsum form { background:#eee; padding:15px; font-family:verdana; font-size:11px; width:310px; left:10px;   }
#loremipsum form fieldset {border:1px solid #eee; }
#loremipsum form fieldset legend { font-weight:bold; padding:6px;  } 
#loremipsum form input[type="text"], #loremipsum form input[type="email"] { border:1px solid #333; background:#FBF9C0; border-radius:6px; padding:2px 3px; }
#loremipsum form label { display:block; margin-bottom:6px; width:120px; height:35px;  }   
#loremipsum form input[type="reset"], #loremipsum form input[type="button"], #loremipsum form input[type="submit"]  {width:80px; border:1px solid #333; padding:2px 4px; margin-right:10px;  }

</style>
            
           <div id="loremipsum" style="display:none;" > 
            <form id="envia" >
             <fieldset><legend> Informaci&oacute;n personal:  </legend>
             <label>Nombres: <input type="text" required id="txtnomb"  name="txtnomb" value="" /></label>
             <label>Direcci&oacute;n: <input required name="txtdirec" id="txtdirec" type="text" value="" /></label>
             <label>Tel&eacute;fono: <input required id="txtfono" name="txtfono"  type="text" value=""  /></label>
			 <label>Email: <input name="txtmail" id="txtmail" type="text" value="" /></label>
             <input type="submit" value="Enviar" name="btnEnviar" id="btnEnviar" onclick="return envia();" >     
             <input type="reset" value="Cancelar" name="btnCancelar">     
             </fieldset>
            </form>
            
            </div>

            
		</div>
	</div>
 </div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="_js/jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript" src="_js/jquery.jfollow.js"></script>
<script type="text/javascript" src="_js/script.js"></script>
<script type="text/javascript" src="_js/cart.js"></script>
<script type="text/javascript" src="_js/fullscreenr.js"></script>
<script src="_js/jquery.masonry.min.js"></script>
<link type="text/css" rel="stylesheet" href="_css/jquery.capty.css"/>
<script type="text/javascript" src="_js/jquery.capty.min.js"></script>

<script type="text/javascript">  
	var FullscreenrOptions = {  width: 1322, height: 897, bgID: '#bgimg' };
	jQuery.fn.fullscreenr(FullscreenrOptions);
	$(function() {
		$('.default').capty({ animation: 'fixed'});
		$('#checkout').click(function() {
			if ($('input:checked').length == 0) {
				alert("Seleccione uno o mas menus de la lista y luego procede su pedido.");
				return false;
			} else {
				return true;
			}
		});
		
	});

	function envia() {
		//alert(decodeURIComponent($('form#envia').serialize()));
		$.ajax({
			type: "POST",
			url: "mail5.php",
			data: decodeURIComponent($("input:checked").serialize()) + 
				  "&" + decodeURIComponent($('form#envia').serialize()),  
			success: function(response) {
				if (response) {
					alert("Gracias por su pedido, en lo mas pronto posible nos comunicaremos con ud.");
					$.lightbox().close();
				}	
			}	
		});		
		return false;
	}
</script>

<link rel="stylesheet" type="text/css" href="_js/lightbox/themes/default/jquery.lightbox.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="_js/lightbox/themes/default/jquery.lightbox.ie6.css" />
<![endif]-->
<script type="text/javascript" src="_js/lightbox/jquery.lightbox.min.js"></script>
<script type="text/javascript">
  jQuery(document).ready(function($){
    $('.lightbox').lightbox();
  });
</script>

</body>
</html>